<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			#div2,#div3{
				width: 100px;
				height: 100px;
				
			}
			div{
				border: 1px solid red;
			}
			#div2{
				float: left;
			}
			#div3{
				float: right;
			}
			#div4{
				/*清除浮动产生的负影响
				 注意：是给受到副影响的元素添加
				clear: both;*/
			}
			#div1{
				/*给自闭的父元素设定高度，达到清除浮动副影响的效果*/
				height: 100px;
			}
		</style>
	</head>
	<body>
		<div id="div1">
			<div id="div2">我是div2</div>
			<div id="div3">我是div3</div>			
		</div>
			<div id="div4">我是div4</div>
	</body>
</html>